Class Config

Global configuration that is passed to Consumer or Producer constructors.

Inheritance
System.Object
Config
Namespace:RdKafka
Assembly:cs.temp.dll.dll
Syntax
public class Config

Constructors

Config()

Declaration
public Config()

Properties

DefaultTopicConfig

Sets the default topic configuration to use for automatically subscribed topics (e.g., through pattern-matched topics).

Declaration
public TopicConfig DefaultTopicConfig { get; set; }
Returns
Type Description
TopicConfig

EnableAutoCommit

Automatically and periodically commit offsets in the background.

Declaration
public bool EnableAutoCommit { get; set; }
Returns
Type Description
System.Boolean

GroupId

Client group id string.

All clients sharing the same group.id belong to the same group.

Declaration
public string GroupId { get; set; }
Returns
Type Description
System.String

Item[String]

Get or set a configuration value directly.

See CONFIGURATION.md for the full list of supported properties.

Declaration
public string this[string name] { get; set; }
Parameters
Type Name Description
System.String name

The configuration property name.

Returns
Type Description
System.String

The configuration property value.

Exceptions
Type Condition
System.ArgumentException

value is invalid.

System.InvalidOperationException

Configuration property name does not exist.

Logger

Set custom logger callback.

By default RdKafka logs using Console.WriteLine.

Declaration
public Config.LogCallback Logger { get; set; }
Returns
Type Description
Config.LogCallback

StatisticsInterval

Statistics emit interval for OnStatistics.

Declaration
public TimeSpan StatisticsInterval { get; set; }
Returns
Type Description
System.TimeSpan

Methods

Dump()

Dump all configuration names and values into a dictionary.

Declaration
public Dictionary<string, string> Dump()
Returns
Type Description
System.Collections.Generic.Dictionary<System.String, System.String>